import React from 'react';
import {Text, View} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';

const IconButton = ({name, size, color, num, onPress}) => {
  return (
    <View
      style={{
        alignItems: 'center',
      }}>
      <Icon name={name} size={size} color={color} onPress={onPress} />
      <Text style={{color: '#fff', fontWeight: 'bold'}}>{num}</Text>
    </View>
  );
};

IconButton.defaultProps = {
  size: 40,
  color: '#fff',
  num: 0,
};
export default IconButton;
